*********************************************************************************
* Ergebnisse zum Abschnitt "Gruppenunterschiede" I								*
*********************************************************************************

* Project: 	Sonderheft ZfP
* Authors: 	Matthias Mader
* Date:		Jan 2025

* Data: secEUrity Project, IPSOS supplementary survey 2024

*********************************************************************************

*** Setup
	clear
	set more off            						// Disable partitioned output
	set dp period									// Use comma instead of dot for decimals
	set linesize 80         						// Line size limit to make output more readable
	macro drop _all         						// clear all macros
	set scheme burd, permanent						// set graph scheme, e.g., cleanplots, plottig, plotplainblind, burd3, s1mono
	graph set window fontface "Times New Roman"		// set font in graphs | "Arial" | "Times New Roman"


*** Open clean data set
	use DATA_clean, clear


*** Abbildung 4

	*Teilabbildungen erstellen
	tab pi_vvshort nss_russia_d2, nof row
	graph bar nss_russia_d2, over(pi_vvshort) asyvars name(g1, replace) ///
		title("Das heutige Russland ist auf absehbare Zeit die größte Bedrohung für" "Frieden und Sicherheit im euroatlantischen Raum.", span size(medlarge)) ///
		legend(off) ///
		yline(.1, lstyle(solid color(gs14))) ///
		yline(.2, lstyle(solid color(gs14))) ///
		yline(.3, lstyle(solid color(gs14))) ///
		yline(.4, lstyle(solid color(gs14))) ///
		yline(.5)  /// 
		yline(.6, lstyle(solid color(gs14))) ///
		yline(.7, lstyle(solid color(gs14))) ///
		yline(.8, lstyle(solid color(gs14))) ///
		ytitle("") yscale(lstyle(none)) ylabel(0 "0%" .1 "10%" .2 "20%"  .3 "30%" .4 "40%" .5 "50%" .60 "60%" .70 "70%" .8 "80%") ///
		bargap(50) ///
		bar(1, color(purple)) bar(2, color(green)) bar(3, color(red)) bar(4, color(yellow)) bar(5, color(black)) bar(6, color(blue)) bar(7, color(gs10)) ///
		text(-.05 7 "BSW", placement(north))		text(-.1 7 "(53%)", placement(north)) ///
		text(-.05 21.5 "Grüne", placement(north))	text(-.1 21.5 "(81%)", placement(north)) ///
		text(-.05 36 "SPD", placement(north))		text(-.1 36 "(78%)", placement(north)) ///
		text(-.05 50.5 "FDP", placement(north))	text(-.1 50.5 "(67%)", placement(north)) ///
		text(-.05 65 "CDU/CSU", placement(north))		text(-.1 65 "(66%)", placement(north)) ///
		text(-.05 79 "AfD", placement(north))		text(-.1 79.05 "(33%)", placement(north)) ///
		text(-.05 94 "Keine Partei", placement(north))		text(-.1 94 "(50%)", placement(north)) ///
		graphregion(margin(0 0 10 5))

	tab pi_vvshort nss_china_d2, row nof
	graph bar nss_china_d2, over(pi_vvshort) asyvars name(g2, replace) ///
		title("China ist Partner, Wettbewerber und systemischer Rivale." " ", span size(medlarge)) ///
		legend(off) ///
		yline(.1, lstyle(solid color(gs14))) ///
		yline(.2, lstyle(solid color(gs14))) ///
		yline(.3, lstyle(solid color(gs14))) ///
		yline(.4, lstyle(solid color(gs14))) ///
		yline(.5)  /// 
		yline(.6, lstyle(solid color(gs14))) ///
		yline(.7, lstyle(solid color(gs14))) ///
		yline(.8, lstyle(solid color(gs14))) ///
		ytitle("") yscale(lstyle(none)) ylabel(0 "0%" .1 "10%" .2 "20%"  .3 "30%" .4 "40%" .5 "50%" .60 "60%" .70 "70%" .8 "80%") ///
		bargap(50) ///
		bar(1, color(purple)) bar(2, color(green)) bar(3, color(red)) bar(4, color(yellow)) bar(5, color(black)) bar(6, color(blue)) bar(7, color(gs10)) ///
		text(-.05 7 "BSW", placement(north))		text(-.1 7 "(48%)", placement(north)) ///
		text(-.05 21.5 "Grüne", placement(north))	text(-.1 21.5 "(58%)", placement(north)) ///
		text(-.05 36 "SPD", placement(north))		text(-.1 36 "(61%)", placement(north)) ///
		text(-.05 50.5 "FDP", placement(north))	text(-.1 50.5 "(67%)", placement(north)) ///
		text(-.05 65 "CDU/CSU", placement(north))		text(-.1 65 "(51%)", placement(north)) ///
		text(-.05 79 "AfD", placement(north))		text(-.1 79.05 "(51%)", placement(north)) ///
		text(-.05 94 "Keine Partei", placement(north))		text(-.1 94 "(40%)", placement(north)) ///
		graphregion(margin(0 0 10 5))

	tab pi_vvshort nss_allies_d2, nof row
	graph bar nss_allies_d2, over(pi_vvshort) asyvars name(g3, replace) ///
		title("Deutschlands Sicherheit ist untrennbar mit der unserer Alliierten und" "europäischen Partner verbunden.", span size(medlarge)) ///
		legend(off) ///
		yline(.1, lstyle(solid color(gs14))) ///
		yline(.2, lstyle(solid color(gs14))) ///
		yline(.3, lstyle(solid color(gs14))) ///
		yline(.4, lstyle(solid color(gs14))) ///
		yline(.5)  /// 
		yline(.6, lstyle(solid color(gs14))) ///
		yline(.7, lstyle(solid color(gs14))) ///
		yline(.8, lstyle(solid color(gs14))) ///
		ytitle("") yscale(lstyle(none)) ylabel(0 "0%" .1 "10%" .2 "20%"  .3 "30%" .4 "40%" .5 "50%" .60 "60%" .70 "70%" .8 "80%") ///
		bargap(50) ///
		bar(1, color(purple)) bar(2, color(green)) bar(3, color(red)) bar(4, color(yellow)) bar(5, color(black)) bar(6, color(blue)) bar(7, color(gs10)) ///
		text(-.05 7 "BSW", placement(north))		text(-.1 7 "(52%)", placement(north)) ///
		text(-.05 21.5 "Grüne", placement(north))	text(-.1 21.5 "(81%)", placement(north)) ///
		text(-.05 36 "SPD", placement(north))		text(-.1 36 "(76%)", placement(north)) ///
		text(-.05 50.5 "FDP", placement(north))		text(-.1 50.5 "(75%)", placement(north)) ///
		text(-.05 65 "CDU/CSU", placement(north))	text(-.1 65 "(65%)", placement(north)) ///
		text(-.05 79 "AfD", placement(north))		text(-.1 79.05 "(40%)", placement(north)) ///
		text(-.05 94 "Keine Partei", placement(north))		text(-.1 94 "(42%)", placement(north)) ///
		graphregion(margin(0 0 10 5))

	tab pi_vvshort nss_nuclear_d2, nof row
	graph bar nss_nuclear_d2, over(pi_vvshort) asyvars name(g4, replace) ///
		title("Solange es Nuklearwaffen gibt, ist der Erhalt einer glaubwürd. nuklearen" "Abschreckung für die NATO und für die Sicherheit Europas unerlässlich.", span size(medlarge)) ///
		legend(off) ///
		yline(.1, lstyle(solid color(gs14))) ///
		yline(.2, lstyle(solid color(gs14))) ///
		yline(.3, lstyle(solid color(gs14))) ///
		yline(.4, lstyle(solid color(gs14))) ///
		yline(.5)  /// 
		yline(.6, lstyle(solid color(gs14))) ///
		yline(.7, lstyle(solid color(gs14))) ///
		yline(.8, lstyle(solid color(gs14))) ///
		ytitle("") yscale(lstyle(none)) ylabel(0 "0%" .1 "10%" .2 "20%"  .3 "30%" .4 "40%" .5 "50%" .60 "60%" .70 "70%" .8 "80%") ///
		bargap(50) ///
		bar(1, color(purple)) bar(2, color(green)) bar(3, color(red)) bar(4, color(yellow)) bar(5, color(black)) bar(6, color(blue)) bar(7, color(gs10)) ///
		text(-.05 7 "BSW", placement(north))		text(-.1 7 "(36%)", placement(north)) ///
		text(-.05 21.5 "Grüne", placement(north))	text(-.1 21.5 "(57%)", placement(north)) ///
		text(-.05 36 "SPD", placement(north))		text(-.1 36 "(63%)", placement(north)) ///
		text(-.05 50.5 "FDP", placement(north))	text(-.1 50.5 "(65%)", placement(north)) ///
		text(-.05 65 "CDU/CSU", placement(north))		text(-.1 65 "(63%)", placement(north)) ///
		text(-.05 79 "AfD", placement(north))		text(-.1 79.05 "(42%)", placement(north)) ///
		text(-.05 94 "Keine Partei", placement(north))		text(-.1 94 "(43%)", placement(north)) ///
		graphregion(margin(0 0 10 5))

	*Teilabbildungen müssen händisch mit kombiniert werden.

